"""
__project__ = 'thc'
__file_name__ = 'run_test'
__author__ = 'thc'
__time__ = '2021/1/12/012 14:38'
__product_name = PyCharm
-*- coding:utf-8 -*-
"""
from HTMLTestRunner_cn import HTMLTestRunner
import time
import unittest


test_dir = './test_case'
discovery = unittest.defaultTestLoader.discover(test_dir, pattern='test*.py')
runner = unittest.TextTestRunner()
runner.run(discovery)


# if __name__ == '__main__':
#     report_dir = './test_report'
#     now = time.strftime('%Y-%m-%d %H_%M_%S')
#     report_name = report_dir + '/' + now + 'result.html'
#
#     with open(report_name, 'wb') as f:
#         runner = HTMLTestRunner(stream=f, title='测试报告', description='帝国软件注册测试')
#         runner.run(discovery)
